<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>分期账单详情</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
    <script th:src="@{/bootstrap/js/jquery.min.js}"></script>
    <script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
</head>
<body onload="loadPage()">
<div class="container">
    <div class="panel panel-info text-center" style="margin-top: 50px;">
        <div class="panel-heading" style="letter-spacing:30px;">
            <h3 id="title">分期账单详情</h3>
        </div>
        <div class="panel-body">
            <table class="table table-condensed table-responsive table-hover text-left">
                <thead class="tab-header-background">
                <tr>
                    <th scope="col" colspan="4" style="text-align: center;font-size: 18px;font-weight: bold">分期账单详情</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <th scope="row" style="width: 25%;">#</th>
                    <th scope="row" style="width: 25%;">服务名称</th>
                    <th scope="row" style="width: 25%;">查询结果</th>
                    <th scope="row" style="width: 25%;">备注</th>
                </tr>
                <tr>
                    <th scope="row">2</th>
                    <td>分期期数</td>
                    <td>
                        <select class="form-control" id="cardnum">
                            <option th:each="myCredit:${date}" th:text="${myCredit.stageNumber}" ></option>
                        </select>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">1</th>
                    <td>分期金额</td>
                    <td id="moneys"></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">3</th>
                    <td>分期日期</td>
                    <td id="applyDate"></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">4</th>
                    <td>利息</td>
                    <td ></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">5</th>
                    <td>还款金额</td>
                    <td th:text="${stage.stageMoney}"></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">6</th>
                    <td>最迟还款日期</td>
                    <td th:text="${stage.stageDate}"></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">7</th>
                    <td>状态</td>
                    <td th:text="${stage.stageStatus}"></td>
                    <td></td>
                </tr>
                <tr>
                    <th scope="row">8</th>
                    <td>提醒还款</td>
                    <td></td>
                    <td></td>
                </tr>
                </tbody>
            </table>
            <div class="panel-footer text-right">
                <input type="hidden" id="ccmsInstallmentId" th:value="${ccmsInstallmentId}">
                八仙过海项目组版权所有
            </div>
        </div>
    </div>
</div>
</body>
<script>
    function loadPage() {
        alert("asdasdsad")
        $("#paySurplus2").text(milliFormat($("#ccmsBillAmount2").val()));
        var creditcardNumber = $("#ccmsInstallmentId").val();
        $.ajax({
            url: "/StageInfor/selectinstallment?installment=" + creditcardNumber,
            dataType: "JSON",
            success: function (data) {
                $("#moneys").text(data.installmentMoney);
                $("#applyDate").text(data.applyDate);
            }
        })

    }
</script>
</html>